package org.saltlux.study.jackrabbit;

import javax.jcr.Repository;

import org.apache.jackrabbit.core.TransientRepository;

public class RepositoryManager {
	private static RepositoryManager SINGLETON;
	
	private RepositoryManager() {
		
	}
	
	public static synchronized RepositoryManager getInstance() {
		if(SINGLETON == null) {
			SINGLETON = new RepositoryManager();
		}
		return SINGLETON;
	}
	
	private Repository repository;
	
	public synchronized Repository getRepository() {
		if(repository == null) {
			repository = new TransientRepository();
		}
		return repository;
	}

}
